package com.hs.common;
/*
 * @Author:iWeeper
 * @Date:2022/5/8 13:06
 * @Version:1.0
 * */

import java.io.InputStream;
import java.util.Properties;

public class Password {
    private static Properties properties;
    static{
        try{
            //加载属性文件
            properties = new Properties();
            InputStream in = Password.class.getClassLoader().getResourceAsStream("password.properties");
            properties.load(in);
        }catch (Exception e){
            e.printStackTrace();
            System.out.println("密码属性文件加载失败");
        }
    }
    public static String studentDefaultPassword(){
        return properties.getProperty("student.password");
    }

    public static String teacherDefaultPassword(){
        return properties.getProperty("teacher.password");
    }

    public static void main(String[] args) {
        System.out.println(Password.studentDefaultPassword());
    }
}
